package fr.afcepf.ai85.ent;

// Generated 21 mars 2013 17:20:56 by Hibernate Tools 3.4.0.CR1

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Representation generated by hbm2java
 */
@Entity
@Table(name = "representation", catalog = "gepeto_db")
public class Representation implements java.io.Serializable {

	private Integer idFiche;
	private Eleve eleve;
	private Adulte adulte;
	private TypeRepresentation typeRepresentation;
	private Date dateDebutRepresentation;
	private Date dateFinRepresentation;
	private boolean reprentantlegal;
	private boolean payeur;
	private String commentaireRepresentation;

	public Representation() {
	}

	public Representation(Eleve eleve, Adulte adulte,
			TypeRepresentation typeRepresentation,
			Date dateDebutRepresentation, boolean reprentantlegal,
			boolean payeur) {
		this.eleve = eleve;
		this.adulte = adulte;
		this.typeRepresentation = typeRepresentation;
		this.dateDebutRepresentation = dateDebutRepresentation;
		this.reprentantlegal = reprentantlegal;
		this.payeur = payeur;
	}

	public Representation(Eleve eleve, Adulte adulte,
			TypeRepresentation typeRepresentation,
			Date dateDebutRepresentation, Date dateFinRepresentation,
			boolean reprentantlegal, boolean payeur,
			String commentaireRepresentation) {
		this.eleve = eleve;
		this.adulte = adulte;
		this.typeRepresentation = typeRepresentation;
		this.dateDebutRepresentation = dateDebutRepresentation;
		this.dateFinRepresentation = dateFinRepresentation;
		this.reprentantlegal = reprentantlegal;
		this.payeur = payeur;
		this.commentaireRepresentation = commentaireRepresentation;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "ID_FICHE", unique = true, nullable = false)
	public Integer getIdFiche() {
		return this.idFiche;
	}

	public void setIdFiche(Integer idFiche) {
		this.idFiche = idFiche;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ID_ELEVE", nullable = false)
	public Eleve getEleve() {
		return this.eleve;
	}

	public void setEleve(Eleve eleve) {
		this.eleve = eleve;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ID_ADULTE", nullable = false)
	public Adulte getAdulte() {
		return this.adulte;
	}

	public void setAdulte(Adulte adulte) {
		this.adulte = adulte;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ID_TYPE", nullable = false)
	public TypeRepresentation getTypeRepresentation() {
		return this.typeRepresentation;
	}

	public void setTypeRepresentation(TypeRepresentation typeRepresentation) {
		this.typeRepresentation = typeRepresentation;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "DATE_DEBUT_REPRESENTATION", nullable = false, length = 10)
	public Date getDateDebutRepresentation() {
		return this.dateDebutRepresentation;
	}

	public void setDateDebutRepresentation(Date dateDebutRepresentation) {
		this.dateDebutRepresentation = dateDebutRepresentation;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "DATE_FIN_REPRESENTATION", length = 10)
	public Date getDateFinRepresentation() {
		return this.dateFinRepresentation;
	}

	public void setDateFinRepresentation(Date dateFinRepresentation) {
		this.dateFinRepresentation = dateFinRepresentation;
	}

	@Column(name = "REPRENTANTLEGAL", nullable = false)
	public boolean isReprentantlegal() {
		return this.reprentantlegal;
	}

	public void setReprentantlegal(boolean reprentantlegal) {
		this.reprentantlegal = reprentantlegal;
	}

	@Column(name = "PAYEUR", nullable = false)
	public boolean isPayeur() {
		return this.payeur;
	}

	public void setPayeur(boolean payeur) {
		this.payeur = payeur;
	}

	@Column(name = "COMMENTAIRE_REPRESENTATION", length = 256)
	public String getCommentaireRepresentation() {
		return this.commentaireRepresentation;
	}

	public void setCommentaireRepresentation(String commentaireRepresentation) {
		this.commentaireRepresentation = commentaireRepresentation;
	}

}
